Product Code Database
Example Keywords: trousers -strategy $56-111
barcode-scavenger
   » » Wiki: History Monoid
Tag Wiki 'History Monoid'.
Tag
In and , a history monoid is a way of representing the histories of concurrently running computer processes as a collection of strings, each string representing the individual history of a process. The history provides a set of synchronization primitives (such as locks, or ) for providing rendezvous points between a set of independently executing processes or threads.

History monoids occur in the theory of concurrent computation, and provide a low-level mathematical foundation for , such as CSP the language of communicating sequential processes, or CCS, the calculus of communicating systems. History monoids were first presented by M.W. Shields.M.W. Shields "Concurrent Machines", Computer Journal, (1985) 28 pp. 449–465.

History monoids are to (free partially monoids) and to the of . As such, they are and are universal. The history monoid is a type of semi-abelian categorical product in the category of monoids.


Product monoids and projection
Let
A=(\Sigma_1,\Sigma_2,\ldots,\Sigma_n)

denote an n-tuple of (not necessarily pairwise disjoint) alphabets \Sigma_k. Let P(A) denote all possible combinations of one finite-length string from each alphabet:

P(A)=\Sigma_1^* \times \Sigma_2^* \times \cdots \times \Sigma_n^*

(In more formal language, P(A) is the Cartesian product of the of the \Sigma_k. The superscript star is the .) Composition in the product monoid is component-wise, so that, for

\mathbf{u}=(u_1,u_2,\ldots,u_n) \,

and

\mathbf{v}=(v_1,v_2,\ldots,v_n) \,

then

\mathbf{uv}=(u_1v_1,u_2v_2,\ldots,u_nv_n) \,

for all \mathbf{u}, \mathbf{v} in P(A). Define the union alphabet to be

\Sigma=\Sigma_1 \cup \Sigma_2 \cup \cdots \cup \Sigma_n. \,

(The union here is the , not the .) Given any string w\in \Sigma^*, we can pick out just the letters in some \Sigma_k^* using the corresponding string projection \pi_k:\Sigma^*\to\Sigma_k^*. A distribution \pi:\Sigma^*\to P(A) is the mapping that operates on w\in \Sigma^* with all of the \pi_k, separating it into components in each free monoid:

\pi(w)\mapsto (\pi_1(w), \pi_2(w), \ldots , \pi_n(w)). \,


Histories
For every a\in\Sigma, the tuple \pi(a) is called the elementary history of a. It serves as an indicator function for the inclusion of a letter a in an alphabet \Sigma_k. That is,

\pi(a)=(a_1,a_2,\ldots,a_n)

where

a_k=\begin{cases}
a \mbox{ if } a\in \Sigma_k \\ \varepsilon \mbox { otherwise }. \end{cases}

Here, \varepsilon denotes the . The history monoid H(A) is the submonoid of the product monoid P(A) generated by the elementary histories: H(A) = \{ \pi(a) | a\in\Sigma \}^* (where the superscript star is the Kleene star applied with a component-wise definition of composition as given above). The elements of H(A) are called global histories, and the projections of a global history are called individual histories.


Connection to computer science
The use of the word history in this context, and the connection to concurrent computing, can be understood as follows. An individual history is a record of the sequence of states of a process (or thread or ); the alphabet \Sigma_k is the set of states of the process.

A letter that occurs in two or more alphabets serves as a synchronization primitive between the various individual histories. That is, if such a letter occurs in one individual history, it must also occur in another history, and serves to "tie" or "rendezvous" them together.

Consider, for example, \Sigma_1=\{a,b,c\} and \Sigma_2=\{a,d,e\}. The union alphabet is of course \Sigma=\{a,b,c,d,e\}. The elementary histories are (a,a), (b,\varepsilon), (c,\varepsilon), (\varepsilon,d) and (\varepsilon,e). In this example, an individual history of the first process might be bcbcc while the individual history of the second machine might be ddded. Both of these individual histories are represented by the global history bcbdddcced, since the projection of this string onto the individual alphabets yields the individual histories. In the global history, the letters b and c can be considered to commute with the letters d and e, in that these can be rearranged without changing the individual histories. Such commutation is simply a statement that the first and second processes are running concurrently, and are unordered with respect to each other; they have not (yet) exchanged any messages or performed any synchronization.

The letter a serves as a synchronization primitive, as its occurrence marks a spot in both the global and individual histories, that cannot be commuted across. Thus, while the letters b and c can be re-ordered past d and e, they cannot be reordered past a. Thus, the global history bcdabe and the global history bdcaeb both have as individual histories bcab and dae, indicating that the execution of d may happen before or after c. However, the letter a is synchronizing, so that e is guaranteed to happen after c, even though e is in a different process than c.


Properties
A history monoid is isomorphic to a , and as such, is a type of semi-abelian categorical product in the category of monoids. In particular, the history monoid H(\Sigma_1,\Sigma_2,\ldots,\Sigma_n) is isomorphic to the trace monoid \mathbb{M}(D) with the dependency relation given by

D=\left(\Sigma_1\times\Sigma_1\right)\cup
\left(\Sigma_2\times\Sigma_2\right)\cup \cdots \cup \left(\Sigma_n\times\Sigma_n\right).

In simple terms, this is just the formal statement of the informal discussion given above: the letters in an alphabet \Sigma_k can be commutatively re-ordered past the letters in an alphabet \Sigma_j, unless they are letters that occur in both alphabets. Thus, traces are exactly global histories, and vice versa.

Conversely, given any trace monoid \mathbb{M}(D), one can construct an isomorphic history monoid by taking a sequence of alphabets \Sigma_{a, b} = \{a, b\} where (a, b) ranges over all pairs in D.


Notes

  • Antoni Mazurkiewicz, "Introduction to Trace Theory", pp. 3–41, in The Book of Traces, V. Diekert, G. Rozenberg, eds. (1995) World Scientific, Singapore
  • Volker Diekert, Yves Métivier, " Partial Commutation and Traces", In G. Rozenberg and , editors, Handbook of Formal Languages, Vol. 3, Beyond Words, pages 457–534. Springer-Verlag, Berlin, 1997.

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs